package com.ruoyi.common.core.enums;

/**
 * @author 吴彦祖
 * @create 2022-03-01 17:29
 */
public enum ClientTypeEnum {
    CBEC_DSP("CBEC-DSP", "出口sp选品系统"),
        CBEC_ADMIN("CBEC-ADMIN", "出口管理系统");

    private final String code;
    private final String name;

    ClientTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static ClientTypeEnum getByCode(String code) {
        for (ClientTypeEnum typeEnum : ClientTypeEnum.values()) {
            if (typeEnum.getCode().equals(code)) {
                return typeEnum;
            }
        }
        return null;
    }
}
